expectation value of hermitian operator